package com.cmfi.domain;

import java.io.Serializable;

import lombok.Data;

/**
 * A EnergyMst.
 */
@SuppressWarnings("common-java:DuplicatedBlocks")
@Data
public class EnergyMst implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private double current;//當前讀數

    //private double lastDay;

    //private Instant createTime;

    // jhipster-needle-entity-add-field - JHipster will add fields here

    public Long getId() {
        return this.id;
    }

    public EnergyMst id(Long id) {
        this.setId(id);
        return this;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public double getCurrent() {
        return this.current;
    }

    public EnergyMst current(Double current) {
        this.setCurrent(current);
        return this;
    }

    public void setCurrent(Double current) {
        this.current = current;
    }

//    public double getLastDay() {
//        return this.lastDay;
//    }
//
//    public EnergyMst lastDay(Double lastDay) {
//        this.setLastDay(lastDay);
//        return this;
//    }
//
//    public void setLastDay(Double lastDay) {
//        this.lastDay = lastDay;
//    }
//
//    public Instant getCreateTime() {
//        return this.createTime;
//    }
//
//    public EnergyMst createTime(Instant createTime) {
//        this.setCreateTime(createTime);
//        return this;
//    }
//
//    public void setCreateTime(Instant createTime) {
//        this.createTime = createTime;
//    }

    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof EnergyMst)) {
            return false;
        }
        return id != null && id.equals(((EnergyMst) o).id);
    }

    @Override
    public int hashCode() {
        // see https://vladmihalcea.com/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
        return getClass().hashCode();
    }

	@Override
	public String toString() {
		return "EnergyMst [id=" + id + ", current=" + current + "]";
			    
	}

}
